import { combineReducers } from '@reduxjs/toolkit';
import {
    SET_AUTH_TOKEN,
} from './Actions';

function setAuthToken(state = null, action) {
    if (action.type === SET_AUTH_TOKEN) return action.token;
    return state;
}

const reducers = combineReducers({
    authToken: setAuthToken
})

export default reducers